package net.joey.file;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;

public class PrintStreamDemo {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			PrintStream ps = new PrintStream(new FileOutputStream("PrintSteam.cc"));
//			ps.print("中文");
//			ps.write(49);
//			ps.close();
			System.setOut(ps);
			System.out.println("a中文bc");
//			System.out.println(49);
			
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
